package com.ifonly.handler;

import java.util.ArrayList;
import java.util.List;

/**
 * @author <a href="mailto:ifonlymaster@163.com">ifonly</a>
 * @version 1.0 2015-12-10 13:20
 * @since JDK 1.6
 */
public class Handlers {

    private Handlers() {

    }

    private static class InstanceHolder {
        private static Handlers instance = new Handlers();
    }

    public static Handlers getInstance() {
        return InstanceHolder.instance;
    }

    private List<Handler> handlers = new ArrayList<Handler>();

    public void add(Handler handler) {
        handlers.add(handler);
    }

    public List<Handler> getHandlers() {
        return handlers;
    }
}
